package com.fengke.cn.yejian11.base;


import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * A simple {@link Fragment} subclass.
 */
public class BaseFragment extends Fragment {

    private static SharedPreferences sharedPreferences;
    private Context context;
    private String Uid;
    public BaseFragment() {
        // Required empty public constructor
    }
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        return null;
    }
    public  String  getUserId()
    {
        sharedPreferences=this.getActivity().getSharedPreferences("kekek", Context.MODE_PRIVATE);
        String Uid = sharedPreferences.getString("uid", null);
        return Uid;
    }
    public void saveUserId(String id)
    {
        sharedPreferences=this.getActivity().getSharedPreferences("kekek", Context.MODE_PRIVATE);
        SharedPreferences.Editor editor=sharedPreferences.edit();
        editor.putString("uid",id);
        editor.commit();
    }

}
